package com.serkol.ams.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName poster_devise
 */
@TableName(value ="poster_devise")
@Data
public class PosterDevise implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Integer x;

    /**
     * 
     */
    private Integer y;

    /**
     * 
     */
    private Integer w;

    /**
     * 
     */
    private Integer h;

    /**
     * 
     */
    private Integer radius;

    /**
     * 
     */
    private Long imageId;

    /**
     * 
     */
    private String type;

    /**
     * 
     */
    private String keyName;

    /**
     * 
     */
    private Integer isRadius;

    /**
     * 
     */
    private Integer isWh;

    /**
     * 
     */
    private Integer attrType;

    /**
     * 
     */
    private Integer status;

    /**
     * 
     */
    private Long posterId;

    /**
     * 
     */
    private Integer fontSize;

    /**
     * 
     */
    private String color;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PosterDevise other = (PosterDevise) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getX() == null ? other.getX() == null : this.getX().equals(other.getX()))
            && (this.getY() == null ? other.getY() == null : this.getY().equals(other.getY()))
            && (this.getW() == null ? other.getW() == null : this.getW().equals(other.getW()))
            && (this.getH() == null ? other.getH() == null : this.getH().equals(other.getH()))
            && (this.getRadius() == null ? other.getRadius() == null : this.getRadius().equals(other.getRadius()))
            && (this.getImageId() == null ? other.getImageId() == null : this.getImageId().equals(other.getImageId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getKeyName() == null ? other.getKeyName() == null : this.getKeyName().equals(other.getKeyName()))
            && (this.getIsRadius() == null ? other.getIsRadius() == null : this.getIsRadius().equals(other.getIsRadius()))
            && (this.getIsWh() == null ? other.getIsWh() == null : this.getIsWh().equals(other.getIsWh()))
            && (this.getAttrType() == null ? other.getAttrType() == null : this.getAttrType().equals(other.getAttrType()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getPosterId() == null ? other.getPosterId() == null : this.getPosterId().equals(other.getPosterId()))
            && (this.getFontSize() == null ? other.getFontSize() == null : this.getFontSize().equals(other.getFontSize()))
            && (this.getColor() == null ? other.getColor() == null : this.getColor().equals(other.getColor()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getX() == null) ? 0 : getX().hashCode());
        result = prime * result + ((getY() == null) ? 0 : getY().hashCode());
        result = prime * result + ((getW() == null) ? 0 : getW().hashCode());
        result = prime * result + ((getH() == null) ? 0 : getH().hashCode());
        result = prime * result + ((getRadius() == null) ? 0 : getRadius().hashCode());
        result = prime * result + ((getImageId() == null) ? 0 : getImageId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getKeyName() == null) ? 0 : getKeyName().hashCode());
        result = prime * result + ((getIsRadius() == null) ? 0 : getIsRadius().hashCode());
        result = prime * result + ((getIsWh() == null) ? 0 : getIsWh().hashCode());
        result = prime * result + ((getAttrType() == null) ? 0 : getAttrType().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getPosterId() == null) ? 0 : getPosterId().hashCode());
        result = prime * result + ((getFontSize() == null) ? 0 : getFontSize().hashCode());
        result = prime * result + ((getColor() == null) ? 0 : getColor().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", x=").append(x);
        sb.append(", y=").append(y);
        sb.append(", w=").append(w);
        sb.append(", h=").append(h);
        sb.append(", radius=").append(radius);
        sb.append(", imageId=").append(imageId);
        sb.append(", type=").append(type);
        sb.append(", keyName=").append(keyName);
        sb.append(", isRadius=").append(isRadius);
        sb.append(", isWh=").append(isWh);
        sb.append(", attrType=").append(attrType);
        sb.append(", status=").append(status);
        sb.append(", posterId=").append(posterId);
        sb.append(", fontSize=").append(fontSize);
        sb.append(", color=").append(color);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}